package com.kuzan.autocloud.gateway.client;

import com.kuzan.autocloud.common.Result;
import com.kuzan.autocloud.common.TokenResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * <p>Description: </p>
 *
 * @author kuzank
 */
@FeignClient(value = "security-client")
public interface SecurityClientService {

    /**
     * 获取令牌
     *
     * @return
     */
    @PostMapping("/token/gateway/build/{id}/{account}")
    Result<TokenResult> buildToken(
            @PathVariable("id") String id,
            @PathVariable("account") String account,
            @RequestBody Map<String, Object> key);
}
